﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using System.Data;
using QuanLyHocBongSinhVien.DAO;
using QuanLyHocBongSinhVien.VO;

namespace QuanLyHocBongSinhVien.Bus
{
    class LoaiHB_NamHoc_Bus
    {
        List<LoaiHB_NamHoc> list = new List<LoaiHB_NamHoc>();
        LoaiHB_NamHoc_DAO lhb = new LoaiHB_NamHoc_DAO();
        public List<LoaiHB_NamHoc> getAll()
        {
            DataTable dt = new DataTable();
            List<LoaiHB_NamHoc> l = new List<LoaiHB_NamHoc>();
            foreach (DataRow r in dt.Rows)
            {
                LoaiHB_NamHoc a = new LoaiHB_NamHoc();
                a.MaNH = r[0].ToString();
                a.MaHB = r[1].ToString();
                a.GhiChu = r[2].ToString();
            }
            return l;
        }

        public DataTable GetAll()
        {
            return lhb.getAllLHBNH();
        }

        public void add(string nh, string hb, string g)
        {
            lhb.them(nh, hb, g);
        }
        public void update(string nh, string hb, string g)
        {
            lhb.them(nh, hb, g);
        }
        public void delete(string nh)
        {
            lhb.xoa(nh);
        }

        public void TimKiemMaNH(string nh)
        {
            lhb.TK_TheoMaNH(nh);
        }

        public void TimKiemMaHB(string hb)
        {
            lhb.TK_TheoMaHB(hb);
        }
    }
}
